
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="/static/jquery-easyui-1.3.1/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <script src="/static/jquery-easyui-1.3.1/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="/static/jquery-easyui-1.3.1/jquery.easyui.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        var treeData = [{
            "id": 1,
            "text": "系统管理",
            "children": [{
                "text": "权限管理",
                "attributes": {
                    "url": "adminlist"
                }
            }]
        }, {
            "id": 2,
            "text": "新闻发布",
            "children": [{
                "text": "图片新闻",
                "attributes": {
                    "url": "/admin/imgnewslist"
                }
            }, {
                "text": "新闻动态",
                "attributes": {
                    "url": "/admin/newslist"
                }
            }, {
                "text": "成功案例",
                "attributes": {
                    "url": "succaselist"
                }
            }]
        }, {
            "id": 3,
            "text": "基本信息",
            "children": [{
                "text": "公司简介",
                "attributes": {
                    "url": "freecomment?typ=4"
                }
            }, {
                "text": "技术支持",
                "attributes": {
                    "url": "freecomment?typ=5"
                }
            }, {
                "text": "诚聘英才",
                "attributes": {
                    "url": "freecomment?typ=6"
                }
            }, {
                "text": "精诚合作",
                "attributes": {
                    "url": "freecomment?typ=7"
                }
            }]
        }];

        $(function () {
//            $.ajax({
//                type: 'get',
//                url: 'menu.json',
//                dataType: 'json',
//                success: function (response) {
                    $("#menu").tree({
                        lines: true,
                        data: treeData,
                        onClick: function (node) {
                            if (node.attributes) {
                                if ($("#pages").tabs("getTab", node.text)) {
                                    $("#pages").tabs("select", node.text);
                                } else {
                                    $("#pages").tabs('add', {
                                        title: node.text,
                                        fit: true,
                                        closable: true,
                                        content: "<iframe frameborder='0' src='" + node.attributes.url + "' style='width:100%;height:100%;'></iframe>"
                                    });
                                }
                            }
                        }
                    });
//                }
//            });

        });

    </script>

    <style type="text/css">
    /* 重写节点选择时的样式 */
.tree-node-selected {
background: #E4E4E4;
}
    
    </style>
</head>
<body class="easyui-layout">
    <form id="form1" runat="server">
    <!--banner-->
    <div data-options="region:'north',border:false" style="height: 60px; background:rgb(6, 53, 99) url(/static/Images/back_logo.png) no-repeat;">
        <div style="float: right;padding-right: 20px;padding-top:5px;">
        <table><tr><td style="color:#fff; font-size:12px; padding-right:5px;">欢迎您，{{ cur_user }}</td><td><img src="/static/Images/exit.png" /></td><td style="color:#fff; font-size:12px; cursor: pointer;" onclick="window.location.href='/admin/logout'">退出</td></tr></table>
        </div>
    </div>
    <!--版权信息-->
    <div data-options="region:'south',border:false" style="height: 20px; background-color: #D2E0F2;">
    </div>
    <!--菜单栏-->
    <div data-options="region:'west',title:'菜单栏',split:true" style="width: 200px;" >
        <ul id="menu">
        </ul>
    </div>
    <!--显示区域-->
    <div data-options="region:'center',border:false">
        <div id="pages" class="easyui-tabs" data-options="fit:true">
            <div title="欢迎">
                <iframe frameborder='0' width="100%" height="100%" src='/static/default.html'></iframe>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
